import 'package:flutter_test/flutter_test.dart';
import 'package:amap_flutter_map_ohos/amap_flutter_map_ohos.dart';
import 'package:amap_flutter_map_ohos/amap_flutter_map_ohos_platform_interface.dart';
import 'package:amap_flutter_map_ohos/amap_flutter_map_ohos_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAmapFlutterMapOhosPlatform
    with MockPlatformInterfaceMixin
    implements AmapFlutterMapOhosPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final AmapFlutterMapOhosPlatform initialPlatform = AmapFlutterMapOhosPlatform.instance;

  test('$MethodChannelAmapFlutterMapOhos is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAmapFlutterMapOhos>());
  });

  test('getPlatformVersion', () async {
    AmapFlutterMapOhos amapFlutterMapOhosPlugin = AmapFlutterMapOhos();
    MockAmapFlutterMapOhosPlatform fakePlatform = MockAmapFlutterMapOhosPlatform();
    AmapFlutterMapOhosPlatform.instance = fakePlatform;

    expect(await amapFlutterMapOhosPlugin.getPlatformVersion(), '42');
  });
}
